use demo::base::hello as basehello;
use demo::demolib;
use demo::hello::good::hello as hellodemo;

use demo::stru::main as user;
use demo::yes::hello as yesdemo;

// use std::io;

fn main() {
    println!("==========main.rs===========");
    demolib();
    hellodemo();
    yesdemo();
    // println!("Guess the number!");
    // println!("Please input your guess.");
    // let mut guess = String::new();
    // io::stdin()
    //     .read_line(&mut guess)
    //     .expect("Failed to read line");
    // println!("You guessed: {guess}");
    println!("hello world!");
    // 常量表达式
    let aaa: u32 = 3 + 7;
    println! {"value is {}", aaa};
    let sa = 42;
    let sb = sa;
    println! {"value is {}", sb};
    let mut _aw;
    _aw = "ssssssss";
    println!("{}", _aw.len());
    let (a, mut b): (bool, bool) = (true, false);
    // a = true,不可变; b = false，可变
    println!("a = {:?}, b = {:?}", a, b);

    b = true;
    assert_eq!(a, b);

    const MAX_POINTS: u32 = 100_000;

    println!("asdf = {}", MAX_POINTS);
    let x = 5;
    // 在main函数的作用域内对之前的x进行遮蔽
    let x = x + 1;

    {
        // 在当前的花括号作用域内，对之前的x进行遮蔽
        let x = x * 2;
        println!("The value of x in the inner scope is: {}", x);
    }

    println!("The value of x is: {}", x);
    let i = 1;
    let t: u32 = 2;
    println!("The value of i is: {}", i);
    println!("the value of t is: {}", t);
    // {
    //     let x = 2.0;
    //     let y: f32 = 3.0;
    // }

    user();
    basehello();
}
